package com.bdd.utils;

/**
 * Created by msi on 2016/4/27 0027.
 */
public class Tools {
    //进行经纬度转墨卡托投影转换
    public static double[] lonLat2Mercator(double x, double y) {
        double X = x * 20037508.34 / 180;
        double Y = Math.log(Math.tan((90 + y) * Math.PI / 360)) / (Math.PI / 180);
        Y = Y * 20037508.34 / 180;
        return new double[]{X, Y};
    }

}
